SaRegisterHtmlAlias
so that the callback function can be invoked from an HTML client.#include "SaRnHtml.h" int SaRegisterHtmlAlias(char* aliasName, char* realName);
SaRegisterHtmlAlias
.aliasName
or realName
are NULL or an empty string.aliasName
or realName
are NULL or an empty string. When Sapphire/Web writes the URLs for the Anchor HREFs that are bound, or the bound forms, a string is inserted which will be processed by your cgi so that the appropriate callback function can be called. For anchors this string is contained in the HREF after "?FNC=". A callback function gets called with a Data Object is executed. its functionality is to populate a Data Site with the Column of Data from the Data Object that it is bound to. There can be one Callback/Data Site or many Data Sites in a single Callback. For example:
<A HREF="http://cezanne/cgi- bin//s.cgi?FNC=Anchor1__Atestmod_html" >Scott</A>In Forms, the string is contained in the VALUE part of a hidden Form Element whose name is
SaSubmitName
. For example:<INPUT TYPE="hidden" NAME="SaFormName" VALUE="Try1__Ftestmod_html">If this function is called more than once to the same
realName
string, only the first registered realName will be used to determine the dispatch function. There is no "unregister". There is no limit on how many aliasNames can be registered for the realName. The order of the calls, SaRegisterHtmlActivator and SaRegisterHtmlAlias, is unimportant in creating the "link". This mechanism allows for multiple HTML files and activators to share the same callback code, minimizing code size as well as making sure multiple copies of the same code are easily maintained. For example:SaRegisterHtmlActivator("GroupBy__Astart_html",AGroupBy); SaRegisterHtmlAlias("GroupBy__Astart_html","Group__ Adetail_html");